<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="JurisPro.modelo.FilaEventos"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Imprimir agenda semanal</title>
</head>
<body>

<jsp:useBean id="user" type="JurisPro.modelo.Usuario" scope="session" />

<table width="776" border="0" align="center" cellpadding="0" cellspacing="0">
     
     <tr>
       <td width="620" height="39" bgcolor="#FFFFFF" align="center" class="topicos">Agenda Processual - <%= user.getNome() %><br /></td>
     </tr>
   </table>
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
       <tr>
         <td>&nbsp;</td>
       </tr>
     </table>
  <jsp:useBean id="eventos" type="java.util.List<JurisPro.modelo.FilaEventos>" scope="request" />
     <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" class="tabela">
       <tr class="sub">
         <td>Pasta</td>
         <td height="30">Autor</td>
         <td>Parte</td>
         <td height="30">Descri&ccedil;&atilde;o</td>
         <td height="30">Local</td>
         <td height="30" colspan="2">Data/Hora</td>
       </tr>
           <%for(FilaEventos evento : eventos){       		
				SimpleDateFormat fmt = new SimpleDateFormat("dd/MM/yyyy");
				   int h = evento.getData().getHours();
				   int m = evento.getData().getMinutes();
				   String hora = ""+h;		if (h < 10) hora = "0"+h;
				   String minuto = ""+m;	if (m < 10) minuto = "0"+m;	
		   %>     				
       <tr bordercolor="#666666" class="texto">
         <td><%= evento.getPasta() %></td>
         <td><%= evento.getAutor()%> </td>
         <td><%= evento.getParte()%></td>
         <td><%= evento.getDescricao() %></td>
         <td><%= evento.getLocal() %></td>
         <td width="54" height="26"><%= fmt.format(evento.getData()) %></td>
         <td width="52">&nbsp;- <%= hora %>:<%= minuto %></td>
       </tr>
       <% } %>
     </table>
</body>
</html>